/*
Autor：DUWEI
*/

package com.ymatou.iapi.orderdelivery.service;
import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;


public class SubscribeExpressInfoCall extends YmatouBaseCall{
	
	private static String opurl ="/api/Deliver/SubscribeExpressInfo";  
	
	public SubscribeExpressInfoCall(){
		
		super(EnvSetup.getSystemUrl("orderdelivery_iapi"),opurl,"POST","JSON"); //域名以及接口的类型
		
	}
	
    public void addDefHeader() {
	        client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
	        client.addHeader("Content-Type", "application/json; charset=UTF-8");
	    }

    /**
	 * 获取Code
	 * 
	 * @return
	 */
	public String getCode() {
		String Code = null;
		try {
			Code = new JSONObject(getReturnData()).getString("Code");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Code;
	}

	/**
	 * 获取BCode
	 * 
	 * @return
	 */
	public String getBCode() {
		String Code = null;
		try {
			Code = new JSONObject(getReturnData()).getString("BCode");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Code;
	}

	/**
	 * 获取Msg
	 * 
	 * @return
	 */
	public String getMsg() {
		String Code = null;
		try {
			Code = new JSONObject(getReturnData()).getString("Msg");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Code;
	}

}
